<!DOCTYPE html>
<html lang="zh" xmlns:th="http://www.thymeleaf.org" >
<head>
	<th:block th:include="include :: header('新增宿舍')" />
	<th:block th:include="include :: select2-css" />
</head>
<body class="white-bg">
    <div class="wrapper wrapper-content animated fadeInRight ibox-content">
        <form class="form-horizontal m" id="form-dorm-add">
			<div class="form-group">	
				<label class="col-sm-2 control-label">校区名称：</label>
				<div class="col-sm-3">
					<select id="schoolId" name="schoolId" class="form-control m-b" >
							<option></option>
							<option th:each="school:${schoolList}"
								th:value="${school.id}"
								th:text="${school.schoolName}"></option>
						</select>
							
							
				</div>
				
				<label class="col-sm-2 control-label">宿舍名称：</label>
				<div class="col-sm-3">
					<input id="dormName" name="dormName" class="form-control" type="text">
				</div>
			</div>
			
		
			
		</form>
	</div>
    <div th:include="include::footer"></div>
    <th:block th:include="include :: select2-js" />
    <script type="text/javascript">
		var prefix = ctx + "Dorm/dorm"
		$("#form-dorm-add").validate({
			rules:{
				xxxx:{
					required:true,
				},
			},
			focusCleanup: true
		});
		
		function submitHandler() {
	        if ($.validate.form()) {
	            $.operate.save(prefix + "/add", $('#form-dorm-add').serialize());
	        }
	    }
	</script>
</body>
</html>
